home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
DELPHI32
/
GRAPHICS
/
IMGLIB95
/
UMULTIM.PA_
/
UMULTIM.PA
Wrap
Text File
|
1996-03-31
|
3KB
|
131 lines
{
Written by Jan Dekkers and Kevin Adams (c) 1995, 1996. If you are a non
registered client, you may use or alter this demo only for evaluation
purposes.
Copyright by SkyLine Tools. All rights reserved.
Part of Imagelib VCL/DLL Library.
}
unit umultim;
{Includes settings to compile in either 16 or 32 bit}
{$I DEFILIB.INC}
interface
uses
{$IFDEF DEL32}
Windows,
{$ELSE}
WinTypes,
WinProcs,
{$ENDIF}
DLL95V1, {ImageLib Dll interface and misc. functions}
Messages,
SysUtils,
Classes,
Graphics,
Controls,
Forms,
Dialogs,
StdCtrls,
Buttons,
MImaTB, {PMultiMedia Toolbar VCL component}
TMultiMP; {PMultiMedia VCL component}
type
TMMForm3 = class(TForm)
Label1: TLabel;
CheckBox1: TCheckBox;
PMultiMedia1: TPMultiMedia;
MultiMediaToolbar1: TMultiMediaToolbar;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
procedure CheckBox1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
MoveImage : boolean;
public
{ Public declarations }
end;
var
MMForm3: TMMForm3;
implementation
{$R *.DFM}
{------------------------------------------------------------------------}
procedure TMMForm3.CheckBox1Click(Sender: TObject);
begin
{Show or hide the toolbar}
MultiMediaToolbar1.ShowToolBar:=CheckBox1.Checked;
end;
{------------------------------------------------------------------------}
procedure TMMForm3.FormClose(Sender: TObject; var Action: TCloseAction);
begin
MMForm3:=Nil;
Action:=caFree;
end;
{------------------------------------------------------------------------}
procedure TMMForm3.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
{If the shift key is down the image can be moved}
if ssShift in Shift then
MoveImage:=true
else
MoveImage:=false;
end;
{------------------------------------------------------------------------}
procedure TMMForm3.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
{In case moveimage is true (Shift key down) move the Image}
if MoveImage then begin
PMultiMedia1.Top:=Y;
PMultiMedia1.Left:=X;
end;
Label2.Caption:='X ='+IntToStr(X)+' Y ='+IntToStr(Y);
end;
{------------------------------------------------------------------------}
procedure TMMForm3.FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
{Reset the moveimage indicater}
MoveImage:=false;
end;
{------------------------------------------------------------------------}
procedure TMMForm3.FormActivate(Sender: TObject);
begin
{On activate show the toolbar}
MultiMediaToolbar1.ShowToolBar:=true;
end;
{------------------------------------------------------------------------}
procedure TMMForm3.FormCreate(Sender: TObject);
begin
MultiMediaToolbar1.PreviewsDir:=ExtractFilePath(Application.Exename);
end;
End.